Expected Class-name before { token

Posted by ML on Stack Overflow See other posts from Stack Overflow or by ML
Published on 2010-04-04T22:59:40Z Indexed on 2010/04/04 23:03 UTC
Read the original article Hit count: 222

Filed under:
|

Hi All,

I am trying to figure out whey I get an error: expected class-name before { token

Here is the relative source to the error:

#pragma once
#ifndef H_FXACTION
#define H_FXACTION

#include "CP_M_RefCounted.h"
#include "FxTypes.h"
#include "string"
#include "FxString.h"
#include "FxPixels.h"
#include "CP_Rect.h"
#include "FxStreamable.h"
#include "FxPoint.h"
#include "FxPtr.h"
#include "FxImage.h"
#include "FxSleekStreaming.h"

typedef FxID FxActionType;
typedef FxUInt32 FxActionID;

FxActionID FrMakeUniqueActionID(void); 

class FxActionData;

class FxActionData : public CP_M_RefCounted
{

    public:
    FxActionData();
    FxActionData(FxBool final) :mFinal(final) { }
    virtual ~FxActionData();

I get the error at this line: class FxActionData : public CP_M_RefCounted

What I dont get is why the line: class FxActionData; is there when you are creating the class directly under it. Isn't this a forward declaration?

What things could be going on here?

© Stack Overflow or respective owner

Related posts about c++

Related posts about compile